home *** CD-ROM | disk | FTP | other *** search
-
- // Extract comma-delimited data from a report
- // - high results only
-
- set limit equal to (arg 1)
-
- input "tests.prn"
-
- do while (someLeft input)
- skip lines until (line matches "~Results for ~(month) ~(year)")
- skip lines until (line contains "-----")
- do while (someLeft input)
- read
- leave if (line contains "-----")
- error if (not (line matches "| ~(ages) | ~(test) | ~(result) |")) "unrecognised line"
- if (result>limit)
- write (year "," month "," ages "," test "," result)
- endif
- loop
-
- // comment out the next line to make the program run faster
- refresh
-
- loop
-
- output "tests.csv"
-